// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import 'font-awesome/css/font-awesome.css'

import {api} from './utility/http'
import {delCookie, delStorage, getCookie, getHeight, getStorage, getWidth, setCookie, setStorage} from './utility/util'
import {isEmptyStr, isNullObj, isEmptyArray} from './utility/CommonUtil'
import VueWechatTitle from 'vue-wechat-title'
import Print from 'vue-print-nb'

Vue.use(Print);
Vue.use(VueWechatTitle)
Vue.use(ElementUI)

//定义全局变量
Vue.prototype.$api = api;
Vue.prototype.$setCookie = setCookie;
Vue.prototype.$getCookie = getCookie;
Vue.prototype.$delCookie = delCookie;
Vue.prototype.$setStorage = setStorage;
Vue.prototype.$getStorage = getStorage;
Vue.prototype.$delStorage = delStorage;
Vue.prototype.$getHeight = getHeight;
Vue.prototype.$getWidth = getWidth;
Vue.prototype.$isEmptyStr = isEmptyStr;
Vue.prototype.$isNullObj = isNullObj;
Vue.prototype.$isEmptyArray = isEmptyArray;

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    components: {
        App
    },
    template: '<App/>'
})
